package com.xinfan.io.buffered;

import java.io.*;

/**
 * @Author xin
 * @Date 2022/6/8 19:55
 * @Version 1.0
 */
public class CopyTest {
    public static void main(String[] args) throws IOException {
        String src = "G:\\桌面\\test.txt";
        String des = "G:\\桌面\\text1.txt";
        String line;
        BufferedReader bufferedReader = new BufferedReader(new FileReader(src));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(des));
        while ((line = bufferedReader.readLine()) != null) {
            bufferedWriter.write(line);
            bufferedWriter.newLine();
        }
        bufferedWriter.close();
        bufferedReader.close();


    }
}
